
<template>
	<view class="index">
		<view class="header">
			<view class="headset">
				<view class="uservip">会员中心</view>
				<view><text class="iconfont icon-shezhi  Sets" @click="UserSet"></text></view>
			</view>
			<view class="portrait">
				<image :src="photo ? photo :'../../static/image/user_01.png'" class="head" @click="clickImg"></image>
				<view class="mobel">
					<text class="mobel-one" v-if='username'>{{username}}</text>
					<text class="mobel-one" @click='navLogin' v-else>请登录</text>
					<view class="authen">
						<text :class="authen ? 'iconfont icon-dunpai dunpai': ''"></text>
						<text class="yi" v-if='authen'>{{authen}}</text>
						<text class="yi" @click='navhoses' v-else>{{stateNames}}</text>
					</view>
				</view>
			</view>
		</view>
		<view class="floor-car">
			<view class="four">
				<view @click="WantTohome">
					<view class="floor"><image class="img" src="../../static/image/building-0.png" mode=""></image></view>

					<view class="onec">我要房屋</view>
				</view>
				<view @click="skipMyvehicle">
					<view class="floor binding"><image class="img" src="../../static/image/icon-vehicle.png" mode=""></image></view>
					<view class="onec">我的车辆</view>
				</view>
				<view @click="fee">
					<view class="floor the"><image class="img" src="../../static/image/icon-the.png" mode=""></image></view>
					<view class="onec">我的缴费</view>
				</view>
				<view @click="familyMember">
					<view class="floor vies"><image class="img" src="../../static/image/icon-fore.png" mode=""></image></view>
					<view class="onec">家庭成员</view>
				</view>
			</view>
		</view>
		<view class="user">
			<view class="userList" @click="repre">
				<view>
					<text class="iconfont icon-tubiao_baoxiujilu sius"></text>
					报修记录
				</view>
				<text class="iconfont icon-arrow-right"></text>
			</view>
			<view class="userList" @click="quesrRecord">
				<view>
					<text class="iconfont icon-yijianfankui sius"></text>
					反馈记录
				</view>
				<text class="iconfont icon-arrow-right"></text>
			</view>
			<view class="userList" @click="quesrCommunity">
				<view>
					<text class="iconfont icon-iconfontzhizuobiaozhun023110 sius"></text>
					联系物业
				</view>
				<text class="iconfont icon-arrow-right"></text>
			</view>
			<view class="userList" @click="updateuser">
				<view>
					<text class="iconfont icon-shezhi1 sius"></text>
					账号设置
				</view>
				<text class="iconfont icon-arrow-right"></text>
			</view>
		</view>
	</view>
</template>

<script>
import { IMGBASEURLS } from '../../utils/config.js';
export default {
	data() {
		return {
			username: '',
			photo: '',
			authen:'',
			stateNames:'未认证'
		};
	},
	onLoad(option) {
		this.photo =  uni.getStorageSync('userinfo').photo;
		this.username = uni.getStorageSync('userinfo').mobile;
		this.authen = uni.getStorageSync('buildings')[0].stateName
		console.log(this.username,this.authen);
	},
	methods: {
		clickImg() {
		    wx.previewImage({
		        urls: [this.photo],
		        current: '',
		    })
		},
		repre() {
			uni.navigateTo({
				url: '../repairs/record'
			});
		},
		UserSet() {
			uni.navigateTo({
				url: '../userSet/index'
			});
		},
		skipMyvehicle() {
			uni.navigateTo({
				url: '../car/addcar'
			});
		},
		updateuser() {
			uni.navigateTo({
				url: '../update/index'
			});
		},
		fee() {
			uni.navigateTo({
				url: '../fee/index'
			});
		},
		quesrRecord() {
			uni.navigateTo({
				url: '../questions/record'
			});
		},
		quesrCommunity() {
			uni.navigateTo({
				url: '../questions/community'
			});
		},
		WantTohome(){
			uni.navigateTo({
				url:'../houses/housesCheck'
			})
		},
		familyMember(){
			uni.navigateTo({
				url:'../house/familyMember'
			})
		},
		navhoses(){
			uni.navigateTo({
				url:'../houses/housesCheck'
			})
		},
		navLogin(){
			uni.navigateTo({
				url:'../login/login'
			})
			
		}
	}
};
</script>
<style lang="less">
@import './../../static/icon/iconfont.less';
@import './../../static/style/userMy.less';
</style>
